package firstwork;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/firstservlet")
public class firstservlet extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String name = request.getParameter("name");
		String password = request.getParameter("password");
		String sport = request.getParameter("sport");
		String[] plays = request.getParameterValues("play");
		String address = request.getParameter("address");
		System.out.println("name :" + name + " password :" + password + " sport:" + sport + " address:" + address);
		if (plays != null) {
			for (int i = 0; i < plays.length; i++) {
				System.out.println(plays[i]);
			}
		}
	}
}
